export default function (timestamp, tsc = false) {
	//tsc 表示是否需要精确到时分秒
	const date = new Date(+timestamp);
	const month = (date.getMonth() + 1).toString().padStart(2, "0");
	const day = date.getDate().toString().padStart(2, "0");
	let ymd = `${date.getFullYear()}-${month}-${day}  `;
	if (tsc) {
		const time = date.getHours().toString().padStart(2, "0");
		const minutes = date.getMinutes().toString().padStart(2, "0");
		const seconds = date.getSeconds().toString().padStart(2, "0");
		ymd += `${time}:${minutes}:${seconds}`;
	}
	return ymd;
}
